-------------------------------------------------------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  C:\Users\Andy baker\OneDrive - University of Colorado at Boulder Office 365\My Documents\Research\Paper PID Experiment\USA\JOP IRT USA 2012 Resu
> lts.log
  log type:  text
 opened on:   7 Mar 2018, 09:06:23

. 
. use "`stick'\My Documents\Research\Paper PID Experiment\USA\ANES\anes_timesseries_2012_trimmed.dta", clear

. svyset [pweight=weight_full]

      pweight: weight_full
          VCE: linearized
  Single unit: missing
     Strata 1: <one>
         SU 1: <observations>
        FPC 1: <zero>

. 
. *I. PARTY ID MEASURES
.         *1: Classic measures
. rename pid_x pid

. mvdecode pid, mv(-2)
         pid: 24 missing values generated

. replace pid=pid-1
(5,890 real changes made)

. label drop _pid_x

. 
. recode pid (0/1=1) (2/4=0) (5/6=2) (.=.), gen(pidtraditional)
(5019 differences between pid and pidtraditional)

. recode pid (0/2=1) (3=0) (4/6=2) (.=.), gen(pidmyth)
(5019 differences between pid and pidmyth)

. 
. recode pid (0/4=0) (5/6=1) (.=.), gen(pidtraditionalrep)
(4405 differences between pid and pidtraditionalrep)

. recode pid (0/1=1) (2/6=0) (.=.), gen(pidtraditionaldem)
(5019 differences between pid and pidtraditionaldem)

. 
. recode pid (0/3=0) (4/6=1) (.=.), gen(pidmythrep)
(4405 differences between pid and pidmythrep)

. recode pid (0/2=1) (3/6=0) (.=.), gen(pidmythdem)
(5019 differences between pid and pidmythdem)

. 
. recode pid (0/3=0) (4=1) (5=2) (6=3) (.=.), gen(pidrep)
(4405 differences between pid and pidrep)

. recode pid (0=3) (1=2) (2=1) (3/6=0) (.=.), gen(piddem)
(5890 differences between pid and piddem)

. 
. svy: prop pid 
(running proportion on estimation sample)

Survey: Proportion estimation

Number of strata =       1        Number of obs   =      5,890
Number of PSUs   =   5,890        Population size =  5,891.633
                                  Design df       =      5,889

--------------------------------------------------------------
             |             Linearized
             | Proportion   Std. Err.     [95% Conf. Interval]
-------------+------------------------------------------------
pid          |
           0 |   .1960426   .0065981      .1834296    .2093006
           1 |   .1509673   .0064427      .1387668    .1640362
           2 |   .1171572   .0054899      .1068162    .1283554
           3 |   .1423712   .0061368      .1307594    .1548306
           4 |   .1222462   .0058485      .1112358    .1341819
           5 |   .1240656    .005963      .1128407    .1362356
           6 |   .1471499   .0063338      .1351615    .1600048
--------------------------------------------------------------

. 
. 
.         *2: Are you close measure
. *Generate "are you close" variable: binary
. gen closerep=0 if cses_closepty==2
(3,600 missing values generated)

. replace closerep=0 if cses_closepty==1 & cses_ptyclost==1
(1,924 real changes made)

. replace closerep=1 if cses_closepty==1 & cses_ptyclost==2 
(1,122 real changes made)

. 
. svy: prop cses_closepty if cses_closepty>0
(running proportion on estimation sample)

Survey: Proportion estimation

Number of strata =       1        Number of obs   =      5,490
Number of PSUs   =   5,490        Population size =  5,477.066
                                  Design df       =      5,489

      _prop_1: cses_closepty = 1. Yes
      _prop_2: cses_closepty = 2. No

---------------------------------------------------------------
              |             Linearized
              | Proportion   Std. Err.     [95% Conf. Interval]
--------------+------------------------------------------------
cses_closepty |
      _prop_1 |   .5605494   .0090511      .5427357    .5782085
      _prop_2 |   .4394506   .0090511      .4217915    .4572643
---------------------------------------------------------------

. 
. gen closedem=0 if cses_closepty==2
(3,600 missing values generated)

. replace closedem=0 if cses_closepty==1 & cses_ptyclost==2
(1,122 real changes made)

. replace closedem=1 if cses_closepty==1 & cses_ptyclost==1 
(1,924 real changes made)

. 
. *Generate "are you close" variable: ordinal
. gen closereplong=0 if cses_closepty==2
(3,600 missing values generated)

.         replace closereplong=0 if cses_closepty==1 & cses_ptyclost==1
(1,924 real changes made)

. replace closereplong=1 if cses_closepty==1 & cses_ptyclost==2 
(1,122 real changes made)

. replace closereplong=3 if closereplong==1 & cses_degclose==1
(313 real changes made)

. replace closereplong=2 if closereplong==1 & cses_degclose==2
(715 real changes made)

. replace closereplong=1 if closereplong==1 & cses_degclose==3
(0 real changes made)

. 
. 
. gen closedemlonglong=0 if cses_closepty==2
(3,600 missing values generated)

. replace closedemlong=0 if cses_closepty==1 & cses_ptyclost==2
(1,122 real changes made)

. replace closedemlong=1 if cses_closepty==1 & cses_ptyclost==1 
(1,924 real changes made)

. replace closedemlong=3 if closedemlong==1 & cses_degclose==1
(805 real changes made)

. replace closedemlong=2 if closedemlong==1 & cses_degclose==2
(1,021 real changes made)

. replace closedemlong=1 if closedemlong==1 & cses_degclose==3
(0 real changes made)

. 
.         *3: Party Registration
. recode prevote_regpty_state (-1=.) (0=0) (1=0), gen(reg_dem)
(3673 differences between prevote_regpty_state and reg_dem)

. replace reg_dem=1 if prevote_regpty==1
(1,443 real changes made)

. 
. recode prevote_regpty_state (-1=.) (0=0) (1=0), gen(reg_rep)
(3673 differences between prevote_regpty_state and reg_rep)

. replace reg_rep=1 if prevote_regpty==2
(804 real changes made)

. 
. 
. *II. OTHER MEASURES RELATED TO PARTY ID
.         *1: Generate feeling thermometers
. recode ft_dem (0/5=0) (6/15=1) (16/25=2) (26/35=3) (36/45=4) (46/55=5) (56/65=6) (66/75=7) (76/85=8) (86/95=9) (96/100=10) (else=.) 
(ft_dem: 5427 changes made)

. recode ft_rep (0/5=0) (6/15=1) (16/25=2) (26/35=3) (36/45=4) (46/55=5) (56/65=6) (66/75=7) (76/85=8) (86/95=9) (96/100=10) (else=.) 
(ft_rep: 4987 changes made)

. gen thermdemminusrep=(ft_dem-ft_rep)+10
(68 missing values generated)

. gen thermrepminusdem=(ft_rep-ft_dem)+10
(68 missing values generated)

. 
.         *2: Generate vote
. recode postvote_presvtwho (1=1) (2=0) (5=0) (-1=0) (else=.), gen(demvote)
(3640 differences between postvote_presvtwho and demvote)

. recode postvote_presvtwho (2=1) (1=0) (5=0) (-1=0) (else=.), gen(repvote)
(5914 differences between postvote_presvtwho and repvote)

. 
. *III. Descriptives
. summ pidtraditionalrep pidmythrep closerep ft_rep repvote  pidtraditionaldem pidmythdem closedem ft_dem demvote 

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
pidtraditi~p |      5,890    .2351443     .424125          0          1
  pidmythrep |      5,890    .3387097    .4733112          0          1
    closerep |      5,360    .2093284    .4068672          0          1
      ft_rep |      5,851    4.102205    2.785275          0         10
     repvote |      5,467    .2815072    .4497754          0          1
-------------+---------------------------------------------------------
pidtraditi~m |      5,890          .4    .4899395          0          1
  pidmythdem |      5,890    .5268251    .4993223          0          1
    closedem |      5,360    .3589552    .4797388          0          1
      ft_dem |      5,856    5.374317    2.912897          0         10
     demvote |      5,467    .4159502    .4929301          0          1

. 
. svy: mean pidtraditionalrep 
(running mean on estimation sample)

Survey: Mean estimation

Number of strata =       1        Number of obs   =      5,890
Number of PSUs   =   5,890        Population size =  5,891.633
                                  Design df       =      5,889

-------------------------------------------------------------------
                  |             Linearized
                  |       Mean   Std. Err.     [95% Conf. Interval]
------------------+------------------------------------------------
pidtraditionalrep |   .2712155   .0079405      .2556492    .2867817
-------------------------------------------------------------------

. estat sd

-------------------------------------
             |       Mean   Std. Dev.
-------------+-----------------------
pidtraditi~p |   .2712155    .4446248
-------------------------------------

. 
. svy: mean pidmythrep
(running mean on estimation sample)

Survey: Mean estimation

Number of strata =       1        Number of obs   =      5,890
Number of PSUs   =   5,890        Population size =  5,891.633
                                  Design df       =      5,889

--------------------------------------------------------------
             |             Linearized
             |       Mean   Std. Err.     [95% Conf. Interval]
-------------+------------------------------------------------
  pidmythrep |   .3934617   .0086449      .3765145    .4104089
--------------------------------------------------------------

. estat sd

-------------------------------------
             |       Mean   Std. Dev.
-------------+-----------------------
  pidmythrep |   .3934617    .4885592
-------------------------------------

. 
. svy: mean closerep
(running mean on estimation sample)

Survey: Mean estimation

Number of strata =       1        Number of obs   =      5,360
Number of PSUs   =   5,360        Population size =  5,351.525
                                  Design df       =      5,359

--------------------------------------------------------------
             |             Linearized
             |       Mean   Std. Err.     [95% Conf. Interval]
-------------+------------------------------------------------
    closerep |   .2440562   .0080688      .2282381    .2598743
--------------------------------------------------------------

. estat sd

-------------------------------------
             |       Mean   Std. Dev.
-------------+-----------------------
    closerep |   .2440562    .4295663
-------------------------------------

. 
. svy: mean ft_rep
(running mean on estimation sample)

Survey: Mean estimation

Number of strata =       1        Number of obs   =      5,851
Number of PSUs   =   5,851        Population size =  5,850.093
                                  Design df       =      5,850

--------------------------------------------------------------
             |             Linearized
             |       Mean   Std. Err.     [95% Conf. Interval]
-------------+------------------------------------------------
      ft_rep |   4.345444   .0489515      4.249481    4.441407
--------------------------------------------------------------

. estat sd

-------------------------------------
             |       Mean   Std. Dev.
-------------+-----------------------
      ft_rep |   4.345444    2.783034
-------------------------------------

. 
. svy: mean repvote
(running mean on estimation sample)

Survey: Mean estimation

Number of strata =       1        Number of obs   =      5,467
Number of PSUs   =   5,467        Population size =  5,452.124
                                  Design df       =      5,466

--------------------------------------------------------------
             |             Linearized
             |       Mean   Std. Err.     [95% Conf. Interval]
-------------+------------------------------------------------
     repvote |   .3171217   .0085593      .3003421    .3339013
--------------------------------------------------------------

. estat sd

-------------------------------------
             |       Mean   Std. Dev.
-------------+-----------------------
     repvote |   .3171217    .4653978
-------------------------------------

. 
. svy: mean pidtraditionaldem 
(running mean on estimation sample)

Survey: Mean estimation

Number of strata =       1        Number of obs   =      5,890
Number of PSUs   =   5,890        Population size =  5,891.633
                                  Design df       =      5,889

-------------------------------------------------------------------
                  |             Linearized
                  |       Mean   Std. Err.     [95% Conf. Interval]
------------------+------------------------------------------------
pidtraditionaldem |   .3470099   .0082508      .3308353    .3631845
-------------------------------------------------------------------

. estat sd

-------------------------------------
             |       Mean   Std. Dev.
-------------+-----------------------
pidtraditi~m |   .3470099    .4760594
-------------------------------------

. 
. svy: mean pidmythdem
(running mean on estimation sample)

Survey: Mean estimation

Number of strata =       1        Number of obs   =      5,890
Number of PSUs   =   5,890        Population size =  5,891.633
                                  Design df       =      5,889

--------------------------------------------------------------
             |             Linearized
             |       Mean   Std. Err.     [95% Conf. Interval]
-------------+------------------------------------------------
  pidmythdem |   .4641671   .0087103      .4470916    .4812425
--------------------------------------------------------------

. estat sd

-------------------------------------
             |       Mean   Std. Dev.
-------------+-----------------------
  pidmythdem |   .4641671    .4987567
-------------------------------------

. 
. svy: mean closedem
(running mean on estimation sample)

Survey: Mean estimation

Number of strata =       1        Number of obs   =      5,360
Number of PSUs   =   5,360        Population size =  5,351.525
                                  Design df       =      5,359

--------------------------------------------------------------
             |             Linearized
             |       Mean   Std. Err.     [95% Conf. Interval]
-------------+------------------------------------------------
    closedem |   .3061841    .008303      .2899068    .3224614
--------------------------------------------------------------

. estat sd

-------------------------------------
             |       Mean   Std. Dev.
-------------+-----------------------
    closedem |   .3061841    .4609502
-------------------------------------

. 
. svy: mean ft_dem
(running mean on estimation sample)

Survey: Mean estimation

Number of strata =       1        Number of obs   =      5,856
Number of PSUs   =   5,856        Population size =  5,851.433
                                  Design df       =      5,855

--------------------------------------------------------------
             |             Linearized
             |       Mean   Std. Err.     [95% Conf. Interval]
-------------+------------------------------------------------
      ft_dem |   5.058846   .0500295       4.96077    5.156923
--------------------------------------------------------------

. estat sd

-------------------------------------
             |       Mean   Std. Dev.
-------------+-----------------------
      ft_dem |   5.058846    2.856017
-------------------------------------

. 
. svy: mean demvote
(running mean on estimation sample)

Survey: Mean estimation

Number of strata =       1        Number of obs   =      5,467
Number of PSUs   =   5,467        Population size =  5,452.124
                                  Design df       =      5,466

--------------------------------------------------------------
             |             Linearized
             |       Mean   Std. Err.     [95% Conf. Interval]
-------------+------------------------------------------------
     demvote |   .3605252   .0086146      .3436371    .3774133
--------------------------------------------------------------

. estat sd

-------------------------------------
             |       Mean   Std. Dev.
-------------+-----------------------
     demvote |   .3605252    .4801968
-------------------------------------

. 
. lambda pidtraditionaldem demvote

           |       RECODE of
 RECODE of |  postvote_presvtwho
 pid (PRE: | (POST: For whom did R
  SUMMARY- |  vote for President)
 Party ID) |         0          1 |     Total
-----------+----------------------+----------
         0 |     2,572        693 |     3,265 
         1 |       612      1,574 |     2,186 
-----------+----------------------+----------
     Total |     3,184      2,267 |     5,451 

lambda_a    0.4030
lambda_b    0.4243
lambda      0.4139

. lambda pidmythdem demvote

           |       RECODE of
 RECODE of |  postvote_presvtwho
 pid (PRE: | (POST: For whom did R
  SUMMARY- |  vote for President)
 Party ID) |         0          1 |     Total
-----------+----------------------+----------
         0 |     2,292        278 |     2,570 
         1 |       892      1,989 |     2,881 
-----------+----------------------+----------
     Total |     3,184      2,267 |     5,451 

lambda_a    0.5447
lambda_b    0.4839
lambda      0.5162

. lambda closedem demvote

           |       RECODE of
           |  postvote_presvtwho
           | (POST: For whom did R
           |  vote for President)
  closedem |         0          1 |     Total
-----------+----------------------+----------
         0 |     2,587        817 |     3,404 
         1 |       484      1,434 |     1,918 
-----------+----------------------+----------
     Total |     3,071      2,251 |     5,322 

lambda_a    0.3217
lambda_b    0.4220
lambda      0.3759

. 
. lambda pidtraditionalrep repvote

           |       RECODE of
 RECODE of |  postvote_presvtwho
 pid (PRE: | (POST: For whom did R
  SUMMARY- |  vote for President)
 Party ID) |         0          1 |     Total
-----------+----------------------+----------
         0 |     3,538        628 |     4,166 
         1 |       378        907 |     1,285 
-----------+----------------------+----------
     Total |     3,916      1,535 |     5,451 

lambda_a    0.2171
lambda_b    0.3446
lambda      0.2865

. lambda pidmythrep repvote

           |       RECODE of
 RECODE of |  postvote_presvtwho
 pid (PRE: | (POST: For whom did R
  SUMMARY- |  vote for President)
 Party ID) |         0          1 |     Total
-----------+----------------------+----------
         0 |     3,324        280 |     3,604 
         1 |       592      1,255 |     1,847 
-----------+----------------------+----------
     Total |     3,916      1,535 |     5,451 

lambda_a    0.5279
lambda_b    0.4319
lambda      0.4843

. lambda closerep repvote

           |       RECODE of
           |  postvote_presvtwho
           | (POST: For whom did R
           |  vote for President)
  closerep |         0          1 |     Total
-----------+----------------------+----------
         0 |     3,578        630 |     4,208 
         1 |       258        856 |     1,114 
-----------+----------------------+----------
     Total |     3,836      1,486 |     5,322 

lambda_a    0.2029
lambda_b    0.4024
lambda      0.3169

. 
. *V: Factor Analy sis check for unidimensionality
. polychoricpca pidtraditionaldem closedem ft_dem demvote

Polychoric correlation matrix

                   pidtraditionaldem           closedem             ft_dem            demvote
pidtraditionaldem                  1
         closedem          .83785839                  1
           ft_dem          .77757724          .73367868                  1
          demvote          .71202769          .70852035          .64267322                  1

Principal component analysis

 k  |  Eigenvalues  |  Proportion explained  |  Cum. explained
----+---------------+------------------------+------------------
  1 |    3.209886   |    0.802471            |   0.802471
  2 |    0.367894   |    0.091974            |   0.894445
  3 |    0.265942   |    0.066486            |   0.960931
  4 |    0.156278   |    0.039069            |   1.000000

. polychoricpca pidmythdem closedem ft_dem demvote

Polychoric correlation matrix

            pidmythdem    closedem      ft_dem     demvote
pidmythdem           1
  closedem    .9039721           1
    ft_dem   .80544701   .73367868           1
   demvote   .81860273   .70852035   .64267322           1

Principal component analysis

 k  |  Eigenvalues  |  Proportion explained  |  Cum. explained
----+---------------+------------------------+------------------
  1 |    3.313186   |    0.828296            |   0.828296
  2 |    0.359459   |    0.089865            |   0.918161
  3 |    0.260320   |    0.065080            |   0.983241
  4 |    0.067035   |    0.016759            |   1.000000

. polychoricpca pidtraditionalrep closerep ft_rep repvote

Polychoric correlation matrix

                   pidtraditionalrep           closerep             ft_rep            repvote
pidtraditionalrep                  1
         closerep          .91084566                  1
           ft_rep          .77759161          .77427201                  1
          repvote          .76896093          .80516241           .6846924                  1

Principal component analysis

 k  |  Eigenvalues  |  Proportion explained  |  Cum. explained
----+---------------+------------------------+------------------
  1 |    3.364908   |    0.841227            |   0.841227
  2 |    0.317487   |    0.079372            |   0.920599
  3 |    0.231307   |    0.057827            |   0.978425
  4 |    0.086298   |    0.021575            |   1.000000

. polychoricpca pidmythrep closerep ft_rep repvote

Polychoric correlation matrix

            pidmythrep    closerep      ft_rep     repvote
pidmythrep           1
  closerep   .94084676           1
    ft_rep   .77740919   .77427201           1
   repvote     .855501   .80516241    .6846924           1

Principal component analysis

 k  |  Eigenvalues  |  Proportion explained  |  Cum. explained
----+---------------+------------------------+------------------
  1 |    3.424657   |    0.856164            |   0.856164
  2 |    0.326858   |    0.081715            |   0.937879
  3 |    0.195203   |    0.048801            |   0.986680
  4 |    0.053282   |    0.013320            |   1.000000

. 
. *VI. Criterion-Validity check
. gen myth_close=.
(5,914 missing values generated)

. replace myth_close=-2 if closedem==1 
(1,924 real changes made)

. replace myth_close=-1 if pidmythdem==1 & cses_closepty==2
(995 real changes made)

. replace myth_close=0 if pid==3 & cses_closepty==2
(652 real changes made)

. replace myth_close=1 if pidmythrep==1 & cses_closepty==2
(657 real changes made)

. replace myth_close=2 if closerep==1
(1,122 real changes made)

. replace myth_close=. if myth_close==2 & pidmythrep~=1 & pid~=3
(30 real changes made, 30 to missing)

. replace myth_close=. if myth_close==-2 & pidmythdem~=1 & pid~=3
(54 real changes made, 54 to missing)

. 
. label define party 2 "Agreed Reps" 1 "Contested Reps" 0 "Agreed nonpart's" -1 "Contested Dems" -2 "Agreed Dems"

. label values myth_close party

. 
. recode postvote_presvtwho (1=1) (2=0) (5=.) (-1=.) (else=.), gen(votebin)
(3640 differences between postvote_presvtwho and votebin)

. recode ft_dpc (0/5=0) (6/15=1) (16/25=2) (26/35=3) (36/45=4) (46/55=5) (56/65=6) (66/75=7) (76/85=8) (86/95=9) (96/100=10) (else=.) 
(ft_dpc: 5141 changes made)

. recode ft_rpc (0/5=0) (6/15=1) (16/25=2) (26/35=3) (36/45=4) (46/55=5) (56/65=6) (66/75=7) (76/85=8) (86/95=9) (96/100=10) (else=.) 
(ft_rpc: 4913 changes made)

. gen obamaminusromney=(ft_dpc-ft_rpc)
(54 missing values generated)

. 
. recode presapp_job_x -9=. -8=. 1=4 2=3 4=2 5=1
(presapp_job_x: 5914 changes made)

. 
. local i=-2

. while `i'<=2 {
  2. svy: mean votebin if myth_close==`i'
  3. local i=`i'+1
  4. }
(running mean on estimation sample)

Survey: Mean estimation

Number of strata =       1        Number of obs   =      1,453
Number of PSUs   =   1,453        Population size =   1,191.84
                                  Design df       =      1,452

--------------------------------------------------------------
             |             Linearized
             |       Mean   Std. Err.     [95% Conf. Interval]
-------------+------------------------------------------------
     votebin |   .9610736    .008052      .9452788    .9768684
--------------------------------------------------------------
(running mean on estimation sample)

Survey: Mean estimation

Number of strata =       1        Number of obs   =        649
Number of PSUs   =     649        Population size =    632.326
                                  Design df       =        648

--------------------------------------------------------------
             |             Linearized
             |       Mean   Std. Err.     [95% Conf. Interval]
-------------+------------------------------------------------
     votebin |   .8591296   .0186969      .8224159    .8958434
--------------------------------------------------------------
(running mean on estimation sample)

Survey: Mean estimation

Number of strata =       1        Number of obs   =        280
Number of PSUs   =     280        Population size =    270.785
                                  Design df       =        279

--------------------------------------------------------------
             |             Linearized
             |       Mean   Std. Err.     [95% Conf. Interval]
-------------+------------------------------------------------
     votebin |   .5169858   .0388746       .440461    .5935106
--------------------------------------------------------------
(running mean on estimation sample)

Survey: Mean estimation

Number of strata =       1        Number of obs   =        437
Number of PSUs   =     437        Population size =     482.32
                                  Design df       =        436

--------------------------------------------------------------
             |             Linearized
             |       Mean   Std. Err.     [95% Conf. Interval]
-------------+------------------------------------------------
     votebin |   .1429113   .0215053      .1006445    .1851782
--------------------------------------------------------------
(running mean on estimation sample)

Survey: Mean estimation

Number of strata =       1        Number of obs   =        867
Number of PSUs   =     867        Population size =  1,013.158
                                  Design df       =        866

--------------------------------------------------------------
             |             Linearized
             |       Mean   Std. Err.     [95% Conf. Interval]
-------------+------------------------------------------------
     votebin |   .0341763   .0079163      .0186388    .0497138
--------------------------------------------------------------

. local i=-2

. while `i'<=2 {
  2. svy: mean obamaminusromney if myth_close==`i'
  3. local i=`i'+1
  4. }
(running mean on estimation sample)

Survey: Mean estimation

Number of strata =       1        Number of obs   =      1,858
Number of PSUs   =   1,858        Population size =  1,579.487
                                  Design df       =      1,857

------------------------------------------------------------------
                 |             Linearized
                 |       Mean   Std. Err.     [95% Conf. Interval]
-----------------+------------------------------------------------
obamaminusromney |   5.997545   .1084564      5.784836    6.210255
------------------------------------------------------------------
(running mean on estimation sample)

Survey: Mean estimation

Number of strata =       1        Number of obs   =        987
Number of PSUs   =     987        Population size =    939.988
                                  Design df       =        986

------------------------------------------------------------------
                 |             Linearized
                 |       Mean   Std. Err.     [95% Conf. Interval]
-----------------+------------------------------------------------
obamaminusromney |   4.166123   .1621183      3.847987     4.48426
------------------------------------------------------------------
(running mean on estimation sample)

Survey: Mean estimation

Number of strata =       1        Number of obs   =        637
Number of PSUs   =     637        Population size =    664.015
                                  Design df       =        636

------------------------------------------------------------------
                 |             Linearized
                 |       Mean   Std. Err.     [95% Conf. Interval]
-----------------+------------------------------------------------
obamaminusromney |   .5261493   .2194046      .0953043    .9569942
------------------------------------------------------------------
(running mean on estimation sample)

Survey: Mean estimation

Number of strata =       1        Number of obs   =        656
Number of PSUs   =     656        Population size =    776.665
                                  Design df       =        655

------------------------------------------------------------------
                 |             Linearized
                 |       Mean   Std. Err.     [95% Conf. Interval]
-----------------+------------------------------------------------
obamaminusromney |  -3.066944   .1974388     -3.454633   -2.679255
------------------------------------------------------------------
(running mean on estimation sample)

Survey: Mean estimation

Number of strata =       1        Number of obs   =      1,090
Number of PSUs   =   1,090        Population size =   1,283.69
                                  Design df       =      1,089

------------------------------------------------------------------
                 |             Linearized
                 |       Mean   Std. Err.     [95% Conf. Interval]
-----------------+------------------------------------------------
obamaminusromney |  -5.529111   .1390947     -5.802035   -5.256187
------------------------------------------------------------------

. local i=-2

. while `i'<=2 {
  2. svy: mean presapp_job_x if myth_close==`i'
  3. local i=`i'+1
  4. }
(running mean on estimation sample)

Survey: Mean estimation

Number of strata =       1        Number of obs   =      1,850
Number of PSUs   =   1,850        Population size =  1,572.475
                                  Design df       =      1,849

---------------------------------------------------------------
              |             Linearized
              |       Mean   Std. Err.     [95% Conf. Interval]
--------------+------------------------------------------------
presapp_job_x |   3.579586   .0244929      3.531549    3.627622
---------------------------------------------------------------
(running mean on estimation sample)

Survey: Mean estimation

Number of strata =       1        Number of obs   =        969
Number of PSUs   =     969        Population size =    917.712
                                  Design df       =        968

---------------------------------------------------------------
              |             Linearized
              |       Mean   Std. Err.     [95% Conf. Interval]
--------------+------------------------------------------------
presapp_job_x |   3.125386   .0438614      3.039311     3.21146
---------------------------------------------------------------
(running mean on estimation sample)

Survey: Mean estimation

Number of strata =       1        Number of obs   =        613
Number of PSUs   =     613        Population size =    634.292
                                  Design df       =        612

---------------------------------------------------------------
              |             Linearized
              |       Mean   Std. Err.     [95% Conf. Interval]
--------------+------------------------------------------------
presapp_job_x |   2.258722   .0571065      2.146573     2.37087
---------------------------------------------------------------
(running mean on estimation sample)

Survey: Mean estimation

Number of strata =       1        Number of obs   =        645
Number of PSUs   =     645        Population size =    760.472
                                  Design df       =        644

---------------------------------------------------------------
              |             Linearized
              |       Mean   Std. Err.     [95% Conf. Interval]
--------------+------------------------------------------------
presapp_job_x |   1.608305    .047606      1.514823    1.701787
---------------------------------------------------------------
(running mean on estimation sample)

Survey: Mean estimation

Number of strata =       1        Number of obs   =      1,082
Number of PSUs   =   1,082        Population size =  1,271.718
                                  Design df       =      1,081

---------------------------------------------------------------
              |             Linearized
              |       Mean   Std. Err.     [95% Conf. Interval]
--------------+------------------------------------------------
presapp_job_x |   1.273784   .0257112      1.223335    1.324233
---------------------------------------------------------------

. 
. 
. 
. svy: mean votebin if myth_close~=.
(running mean on estimation sample)

Survey: Mean estimation

Number of strata =       1        Number of obs   =      3,686
Number of PSUs   =   3,686        Population size =  3,590.429
                                  Design df       =      3,685

--------------------------------------------------------------
             |             Linearized
             |       Mean   Std. Err.     [95% Conf. Interval]
-------------+------------------------------------------------
     votebin |   .5381649   .0111657      .5162735    .5600564
--------------------------------------------------------------

. estat sd

-------------------------------------
             |       Mean   Std. Dev.
-------------+-----------------------
     votebin |   .5381649    .4986089
-------------------------------------

. 
. svy: mean obamaminusromney if myth_close~=.
(running mean on estimation sample)

Survey: Mean estimation

Number of strata =       1        Number of obs   =      5,228
Number of PSUs   =   5,228        Population size =  5,243.845
                                  Design df       =      5,227

------------------------------------------------------------------
                 |             Linearized
                 |       Mean   Std. Err.     [95% Conf. Interval]
-----------------+------------------------------------------------
obamaminusromney |   .8121653   .1106013      .5953405     1.02899
------------------------------------------------------------------

. estat sd

-------------------------------------
             |       Mean   Std. Dev.
-------------+-----------------------
obamaminus~y |   .8121653    5.945596
-------------------------------------

. 
. svy: mean presapp_job_x if myth_close~=.
(running mean on estimation sample)

Survey: Mean estimation

Number of strata =       1        Number of obs   =      5,159
Number of PSUs   =   5,159        Population size =  5,156.669
                                  Design df       =      5,158

---------------------------------------------------------------
              |             Linearized
              |       Mean   Std. Err.     [95% Conf. Interval]
--------------+------------------------------------------------
presapp_job_x |   2.476922   .0238219      2.430221    2.523623
---------------------------------------------------------------

. estat sd

-------------------------------------
             |       Mean   Std. Dev.
-------------+-----------------------
presapp_jo~x |   2.476922    1.276395
-------------------------------------

. 
. recode myth_close -1=1 1=1 0=2 .=. else=0, gen(fns)
(4609 differences between myth_close and fns)

. separate votebin, by(fns)

              storage   display    value
variable name   type    format     label      variable label
-------------------------------------------------------------------------------------------------------------------------------------------------------------
votebin0        byte    %9.0g                 votebin, fns == 0
votebin1        byte    %9.0g                 votebin, fns == 1
votebin2        byte    %9.0g                 votebin, fns == 2

. separate presapp_job_x, by(fns)

              storage   display    value
variable name   type    format     label      variable label
-------------------------------------------------------------------------------------------------------------------------------------------------------------
presapp_job_x0  byte    %26.0g     _presapp_job_x
                                              presapp_job_x, fns == 0
presapp_job_x1  byte    %26.0g     _presapp_job_x
                                              presapp_job_x, fns == 1
presapp_job_x2  byte    %26.0g     _presapp_job_x
                                              presapp_job_x, fns == 2

. separate obamaminusromney, by(fns)

              storage   display    value
variable name   type    format     label      variable label
-------------------------------------------------------------------------------------------------------------------------------------------------------------
obamaminusrom~0 byte    %9.0g                 obamaminusromney, fns == 0
obamaminusrom~1 byte    %9.0g                 obamaminusromney, fns == 1
obamaminusrom~2 byte    %9.0g                 obamaminusromney, fns == 2

. 
.         *bar graphs
. graph bar (mean) votebin?, over(myth_close, label(angle(0) labsize(small) alternate tick labgap(0)))  graphregion(color(white)) plotregion(lcolor(black)) /
> //
> blabel(bar, format(%9.2f) size(small)) bar(1, color(black)) bar(2, color(gs12)) bar(3, color(gs16) lcolor(black)) title("B1: Obama 2-party vote") ytitle(""
> ) ylab(, labsize(small))  legend(off) nofill

. graph save "`stick'\My Documents\Research\Paper PID Experiment\USA\gr1.gph", replace
(file C:\Users\Andy baker\OneDrive - University of Colorado at Boulder Office 365\My Documents\Research\Paper PID Experiment\USA\gr1.gph saved)

. 
. graph bar (mean) presapp_job_x?, over(myth_close, label(angle(0) labsize(small) alternate tick labgap(0))) graphregion(color(white)) plotregion(lcolor(blac
> k))  ///
> blabel(bar, format(%9.2f) size(small)) bar(1, color(black)) bar(2, color(gs12)) bar(3, color(gs16) lcolor(black))   title("B2: Obama job approval") ytitle(
> "") exclude0 yscale(range(1(.5)4)) ytick(1 2 3 4) ylab(1 2 3 4)  ylab(, labsize(small))  legend(off) nofill

. graph save "`stick'\My Documents\Research\Paper PID Experiment\USA\gr3.gph", replace
(file C:\Users\Andy baker\OneDrive - University of Colorado at Boulder Office 365\My Documents\Research\Paper PID Experiment\USA\gr3.gph saved)

. 
. graph bar (mean) obamaminusromney?, over(myth_close, label(angle(0) labsize(small) alternate tick labgap(0))) graphregion(color(white)) plotregion(lcolor(b
> lack))  ///
> blabel(bar, format(%9.2f) size(small)) bar(1, color(black)) bar(2, color(gs12)) bar(3, color(gs16) lcolor(black))   title("B3: Obama - Romney feeling therm
> s") ytitle("") ytick(-5 -2.5 0 2.5 5) ylab(-5 -2.5 0 2.5 5)  ylab(, labsize(small))  legend(off) nofill

. graph save "`stick'\My Documents\Research\Paper PID Experiment\USA\gr4.gph", replace
(file C:\Users\Andy baker\OneDrive - University of Colorado at Boulder Office 365\My Documents\Research\Paper PID Experiment\USA\gr4.gph saved)

. 
. graph combine ///
> "`stick'\My Documents\Research\Paper PID Experiment\USA\gr1.gph" ///
> "`stick'\My Documents\Research\Paper PID Experiment\USA\gr3.gph" ///
> "`stick'\My Documents\Research\Paper PID Experiment\USA\gr4.gph", ///
> row(2) col(2) graphregion(color(white))

. graph export "`stick'\My Documents\Research\Paper PID Experiment\LaTeX\JOPUSACriterion.pdf", as(pdf) replace
(file C:\Users\Andy baker\OneDrive - University of Colorado at Boulder Office 365\My Documents\Research\Paper PID Experiment\LaTeX\JOPUSACriterion.pdf writte
> n in PDF format)

. 
. *keep pidtraditionaldem closedem thermdemminusrep demvote weight_full
. *save "`stick':\My Documents\Research\Paper PID Experiment\USA\ANES\anes_timesseries_2012_trimmed_to_stata.dta", replace
. 
. *V: Run IRT models
.         *note that the nrm isn't quite right here because the proper comparison is (SD+WD)/(SR+WR+IR+I+ID) and (ID+SD+WD)/(SR+WR+IR+I).
.         *nrm would do the following: (SD+WD)/(SR+WR+IR+I) and (ID)/(SR+WR+IR+I). Hence, need to run separate models
.         
.         *1: Reps Results
. drop admin*

. svy: irt grm pidtraditionalrep closerep ft_rep repvote, intpoints(30) difficult intmethod(mvaghermite)
(running irt on estimation sample)

Survey: Graded response model

Number of strata   =         1                  Number of obs     =      5,912
Number of PSUs     =     5,912                  Population size   =  5,907.323
                                                Design df         =      5,911

------------------------------------------------------------------------------
             |             Linearized
             |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
pidtraditi~p |
     Discrim |   4.585414   .3429556    13.37   0.000     3.913096    5.257733
        Diff |
         =1  |   .6754548   .0263629    25.62   0.000     .6237738    .7271357
-------------+----------------------------------------------------------------
closerep     |
     Discrim |   5.244971   .4795262    10.94   0.000     4.304924    6.185017
        Diff |
         =1  |   .7627897   .0272545    27.99   0.000     .7093609    .8162184
-------------+----------------------------------------------------------------
ft_rep       |
     Discrim |   2.655545   .1073632    24.73   0.000     2.445074    2.866016
        Diff |
       >= 1  |   -1.23637   .0369281   -33.48   0.000    -1.308762   -1.163977
       >= 2  |  -.8318502   .0312783   -26.60   0.000    -.8931671   -.7705333
       >= 3  |  -.7796049   .0307129   -25.38   0.000    -.8398133   -.7193964
       >= 4  |  -.4611835   .0278846   -16.54   0.000    -.5158475   -.4065195
       >= 5  |   -.145847   .0264263    -5.52   0.000    -.1976522   -.0940418
       >= 6  |   .4073591   .0268748    15.16   0.000     .3546747    .4600434
       >= 7  |   .8868883   .0310068    28.60   0.000     .8261037    .9476729
       >= 8  |   1.416217   .0403545    35.09   0.000     1.337108    1.495327
       >= 9  |   2.040904   .0578712    35.27   0.000     1.927455    2.154352
        =10  |   2.264409   .0667297    33.93   0.000     2.133595    2.395224
-------------+----------------------------------------------------------------
repvote      |
     Discrim |   2.445826   .1228457    19.91   0.000     2.205003    2.686648
        Diff |
         =1  |    .592197   .0312327    18.96   0.000     .5309695    .6534245
------------------------------------------------------------------------------

. predict probtraditionalrep, outcome(pidtraditionalrep #2) 
(option pr assumed)
(option conditional(ebmeans) assumed)
(using 30 quadrature points)

. predict latenttradrep, latent
(option ebmeans assumed)
(using 30 quadrature points)

. 
. svy: irt grm pidmythrep closerep ft_rep repvote, intpoints(30) difficult intmethod(mvaghermite)
(running irt on estimation sample)

Survey: Graded response model

Number of strata   =         1                  Number of obs     =      5,912
Number of PSUs     =     5,912                  Population size   =  5,907.323
                                                Design df         =      5,911

------------------------------------------------------------------------------
             |             Linearized
             |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
pidmythrep   |
     Discrim |   9.719207   2.024874     4.80   0.000     5.749715     13.6887
        Diff |
         =1  |   .2905215   .0232351    12.50   0.000     .2449722    .3360708
-------------+----------------------------------------------------------------
closerep     |
     Discrim |   5.476096   .4625571    11.84   0.000     4.569315    6.382876
        Diff |
         =1  |   .7483739   .0270763    27.64   0.000     .6952946    .8014532
-------------+----------------------------------------------------------------
ft_rep       |
     Discrim |   2.482716   .0904066    27.46   0.000     2.305486    2.659946
        Diff |
       >= 1  |  -1.259498   .0380301   -33.12   0.000    -1.334051   -1.184945
       >= 2  |  -.8463602   .0319949   -26.45   0.000    -.9090818   -.7836386
       >= 3  |  -.7932551   .0313851   -25.27   0.000    -.8547813   -.7317288
       >= 4  |  -.4708249   .0284003   -16.58   0.000    -.5264997     -.41515
       >= 5  |  -.1532753   .0268617    -5.71   0.000     -.205934   -.1006165
       >= 6  |   .4071474   .0275938    14.76   0.000     .3530534    .4612414
       >= 7  |   .8992818   .0320169    28.09   0.000      .836517    .9620465
       >= 8  |   1.446023    .041466    34.87   0.000     1.364735    1.527312
       >= 9  |   2.091533   .0594723    35.17   0.000     1.974945     2.20812
        =10  |   2.323089   .0686294    33.85   0.000     2.188551    2.457628
-------------+----------------------------------------------------------------
repvote      |
     Discrim |    2.64876   .1290385    20.53   0.000     2.395797    2.901723
        Diff |
         =1  |   .5793393   .0301467    19.22   0.000     .5202408    .6384379
------------------------------------------------------------------------------

. predict latentmythrep, latent
(option ebmeans assumed)
(using 30 quadrature points)

. summ latentmythrep

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
latentmyth~p |      5,914   -.0948932    .8777176  -1.309202   1.963893

. 
. test _b[pidmythrep:Theta]=_b[closerep:Theta]

Adjusted Wald test

 ( 1)  [pidmythrep]Theta - [closerep]Theta = 0

       F(  1,  5911) =    3.75
            Prob > F =    0.0529

. 
. 
. irtgraph icc (ft_rep, lcolor(gs14) lwidth(vthin) lpattern(dash)) (pidmythrep closerep, lcolor(black) lwidth(medium)) (repvote, lcolor(black) lpattern(dash)
>  lwidth(medium)), ///
> bcc range(-1.31 1.96) legend(off) graphregion(color(white)) plotregion(lstyle(yxline) lcolor(black)) b1title("{it: θ{subscript:Rep}}: Strength of Republica
> n Partisanship") xtitle("") ytitle("{it:Pr}({it:x{subscript:j•Rep}}|{it: θ{subscript:Rep}})") title("") xtick(-2(.5)2) xlabel(-2(1)2) ///
> addplot((scatter probtraditionalrep latenttradrep, msymbol(i) connect(l) sort lcolor(black) lwidth(medium)) ///
> (scatteri .5 .22 "Think*({it:P{superscript:1}N{superscript:0}})", msymbol(i) mlabpos(0) mlabangle(83) mlabcolor(black) mlabsize(small)) ///
> (scatteri .2 -.03 "Pres. vote", msymbol(i) mlabpos(0) mlabangle(46) mlabcolor(black) lpattern(dash) mlabsize(vsmall)) ///
> (scatteri .25 .35 "Think({it:P{superscript:1}N{superscript:1}})", msymbol(i) mlabpos(0) mlabangle(68) mlabcolor(black) mlabsize(small)) ///
> (scatteri .5 .86 "Close({it:P{superscript:0}N{superscript:1}})", msymbol(i) mlabpos(0) mlabangle(77) mlabcolor(black) mlabsize(small)))

. graph export "`stick'\My Documents\Research\Paper PID Experiment\LaTeX\JOPRepsIRT.pdf", as(pdf) replace 
(file C:\Users\Andy baker\OneDrive - University of Colorado at Boulder Office 365\My Documents\Research\Paper PID Experiment\LaTeX\JOPRepsIRT.pdf written in 
> PDF format)

. 
.         *2: Dems Results
. svy: irt grm pidtraditionaldem closedem ft_dem demvote, intpoints(30) difficult intmethod(mvaghermite)
(running irt on estimation sample)

Survey: Graded response model

Number of strata   =         1                  Number of obs     =      5,912
Number of PSUs     =     5,912                  Population size   =  5,907.323
                                                Design df         =      5,911

------------------------------------------------------------------------------
             |             Linearized
             |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
pidtraditi~m |
     Discrim |   4.367002    .338955    12.88   0.000     3.702526    5.031478
        Diff |
         =1  |   .4606778   .0243063    18.95   0.000     .4130286     .508327
-------------+----------------------------------------------------------------
closedem     |
     Discrim |   3.711989   .2409439    15.41   0.000     3.239651    4.184327
        Diff |
         =1  |   .6171019   .0260347    23.70   0.000     .5660644    .6681393
-------------+----------------------------------------------------------------
ft_dem       |
     Discrim |   2.816552   .1164959    24.18   0.000     2.588178    3.044927
        Diff |
       >= 1  |  -1.540793    .042188   -36.52   0.000    -1.623497   -1.458089
       >= 2  |   -1.10758   .0340479   -32.53   0.000    -1.174326   -1.040833
       >= 3  |  -1.044505   .0333097   -31.36   0.000    -1.109804   -.9792056
       >= 4  |  -.7209873   .0299796   -24.05   0.000    -.7797581   -.6622164
       >= 5  |  -.3975485   .0275508   -14.43   0.000    -.4515581   -.3435388
       >= 6  |   .1194704    .025514     4.68   0.000     .0694537    .1694872
       >= 7  |   .5465223   .0261549    20.90   0.000     .4952491    .5977954
       >= 8  |    1.01233   .0300542    33.68   0.000     .9534125    1.071247
       >= 9  |   1.572863   .0405428    38.80   0.000     1.493384    1.652342
        =10  |    1.67769   .0431378    38.89   0.000     1.593124    1.762256
-------------+----------------------------------------------------------------
demvote      |
     Discrim |   2.027485   .1006088    20.15   0.000     1.830255    2.224715
        Diff |
         =1  |   .4911345   .0312841    15.70   0.000     .4298062    .5524627
------------------------------------------------------------------------------

. predict probtraditionaldem, outcome(pidtraditionaldem #2)
(option pr assumed)
(option conditional(ebmeans) assumed)
(using 30 quadrature points)

. predict latenttraddem, latent
(option ebmeans assumed)
(using 30 quadrature points)

. 
. svy: irt grm pidmythdem closedem ft_dem demvote, intpoints(30) difficult intmethod(mvaghermite) 
(running irt on estimation sample)

Survey: Graded response model

Number of strata   =         1                  Number of obs     =      5,912
Number of PSUs     =     5,912                  Population size   =  5,907.323
                                                Design df         =      5,911

------------------------------------------------------------------------------
             |             Linearized
             |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
pidmythdem   |
     Discrim |   14.40992   3.628988     3.97   0.000      7.29578    21.52406
        Diff |
         =1  |   .1168048   .0251745     4.64   0.000     .0674535    .1661561
-------------+----------------------------------------------------------------
closedem     |
     Discrim |   3.759748   .2266706    16.59   0.000      3.31539    4.204105
        Diff |
         =1  |   .6136817     .02712    22.63   0.000     .5605166    .6668467
-------------+----------------------------------------------------------------
ft_dem       |
     Discrim |   2.621195   .0912453    28.73   0.000     2.442321    2.800069
        Diff |
       >= 1  |  -1.572215   .0433461   -36.27   0.000    -1.657189   -1.487241
       >= 2  |  -1.129434   .0355373   -31.78   0.000      -1.1991   -1.059768
       >= 3  |  -1.065091   .0347652   -30.64   0.000    -1.133243   -.9969381
       >= 4  |  -.7353049    .031545   -23.31   0.000    -.7971447   -.6734652
       >= 5  |  -.4060486   .0291544   -13.93   0.000    -.4632018   -.3488954
       >= 6  |   .1231356   .0274227     4.49   0.000      .069377    .1768942
       >= 7  |   .5607656    .027924    20.08   0.000     .5060244    .6155067
       >= 8  |   1.037496   .0315593    32.87   0.000     .9756282    1.099364
       >= 9  |   1.613048   .0411884    39.16   0.000     1.532304    1.693792
        =10  |   1.720682    .043816    39.27   0.000     1.634787    1.806578
-------------+----------------------------------------------------------------
demvote      |
     Discrim |    2.20046   .1055698    20.84   0.000     1.993504    2.407415
        Diff |
         =1  |   .4793498   .0311192    15.40   0.000     .4183447    .5403549
------------------------------------------------------------------------------

. predict latentmythdem, latent
(option ebmeans assumed)
(using 30 quadrature points)

. summ latentmythdem

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
latentmyth~m |      5,914    .1244985    .9282222  -1.507271   1.742526

. 
. test _b[pidmythdem:Theta]=_b[closedem:Theta]

Adjusted Wald test

 ( 1)  [pidmythdem]Theta - [closedem]Theta = 0

       F(  1,  5911) =    8.42
            Prob > F =    0.0037

. 
. irtgraph icc (ft_dem, lcolor(gs14) lwidth(vthin) lpattern(dash)) (pidmythdem closedem, lcolor(black) lwidth(medium)) (demvote, lcolor(black) lpattern(dash)
>  lwidth(medium)), ///
> bcc range(-1.5 1.74) legend(off) graphregion(color(white)) plotregion(lstyle(yxline) lcolor(black)) b1title("{it: θ{subscript:Dem}}: Strength of Democratic
>  Partisanship") xtitle("") ytitle("{it:Pr}({it:x{subscript:j•Dem}}|{it: θ{subscript:Dem}})") title("") xtick(-2(.5)2) xlabel(-2(1)2) ///
> addplot((scatter probtraditionaldem latenttraddem, msymbol(i) connect(l) sort lcolor(black) lwidth(medium)) ///
> (scatteri .5 .05 "Think*({it:P{superscript:1}N{superscript:0}})", msymbol(i) mlabpos(0) mlabangle(85) mlabcolor(black) mlabsize(small)) ///
> (scatteri .22 -.16 "Pres. vote", msymbol(i) mlabpos(0) mlabangle(45) mlabcolor(black) lpattern(dash) mlabsize(vsmall)) ///
> (scatteri .6 .49 "Think({it:P{superscript:1}N{superscript:1}})", msymbol(i) mlabpos(0) mlabangle(71) mlabcolor(black) mlabsize(small)) ///
> (scatteri .5 .73 "Close({it:P{superscript:0}N{superscript:1}})", msymbol(i) mlabpos(0) mlabangle(70) mlabcolor(black) mlabsize(small)))  

. graph export "`stick'\My Documents\Research\Paper PID Experiment\LaTeX\JOPDemsIRT.pdf", as(pdf) replace
(file C:\Users\Andy baker\OneDrive - University of Colorado at Boulder Office 365\My Documents\Research\Paper PID Experiment\LaTeX\JOPDemsIRT.pdf written in 
> PDF format)

. 
. *Item-rest validation
. svy: irt grm closerep ft_rep repvote, intpoints(30) difficult intmethod(mvaghermite)
(running irt on estimation sample)

Survey: Graded response model

Number of strata   =         1                  Number of obs     =      5,909
Number of PSUs     =     5,909                  Population size   =  5,904.871
                                                Design df         =      5,908

------------------------------------------------------------------------------
             |             Linearized
             |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
closerep     |
     Discrim |   5.246856   .6896193     7.61   0.000      3.89495    6.598762
        Diff |
         =1  |   .7506637   .0285128    26.33   0.000     .6947681    .8065593
-------------+----------------------------------------------------------------
ft_rep       |
     Discrim |   2.517039   .1207202    20.85   0.000     2.280383    2.753695
        Diff |
       >= 1  |  -1.256498   .0397155   -31.64   0.000    -1.334355   -1.178641
       >= 2  |  -.8437821   .0330012   -25.57   0.000    -.9084764   -.7790877
       >= 3  |  -.7902774   .0323643   -24.42   0.000    -.8537234   -.7268315
       >= 4  |  -.4642357   .0288159   -16.11   0.000    -.5207253    -.407746
       >= 5  |  -.1430213   .0269675    -5.30   0.000    -.1958875   -.0901552
       >= 6  |    .413741    .027664    14.96   0.000     .3595093    .4679726
       >= 7  |   .8971902   .0324699    27.63   0.000     .8335373    .9608432
       >= 8  |   1.439619   .0431038    33.40   0.000      1.35512    1.524118
       >= 9  |    2.08083   .0629512    33.05   0.000     1.957423    2.204238
        =10  |   2.310608   .0716608    32.24   0.000     2.170127     2.45109
-------------+----------------------------------------------------------------
repvote      |
     Discrim |   2.654874    .154297    17.21   0.000     2.352395    2.957353
        Diff |
         =1  |   .5754543   .0306861    18.75   0.000     .5152984    .6356103
------------------------------------------------------------------------------

. predict latentrep_rest, latent
(option ebmeans assumed)
(using 30 quadrature points)

. polychoric latentrep_rest pidtraditionalrep pidmythrep, pw verbose

Variables :  latentrep_rest pidtraditionalrep
Type :       polyserial
Rho        = .81593894
S.e.       = .00778754

Variables :  latentrep_rest pidmythrep
Type :       polyserial
Rho        = .85938158
S.e.       = .00646036
numerical derivatives are approximate
nearby values are missing
could not calculate numerical derivatives
missing values encountered
numerical derivatives are approximate
nearby values are missing
could not calculate numerical derivatives
missing values encountered

Variables :  pidtraditionalrep pidmythrep
Type :       polychoric
Rho        = .
S.e.       = .
Goodness of fit tests:
Pearson G2 = ., Prob( >chi2(.)) = .
LR X2      = ., Prob( >chi2(.)) = .

. 
. svy: irt grm closedem ft_dem demvote, intpoints(30) difficult intmethod(mvaghermite)
(running irt on estimation sample)

Survey: Graded response model

Number of strata   =         1                  Number of obs     =      5,908
Number of PSUs     =     5,908                  Population size   =  5,904.385
                                                Design df         =      5,907

------------------------------------------------------------------------------
             |             Linearized
             |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
closedem     |
     Discrim |   3.998936   .4181761     9.56   0.000     3.179158    4.818714
        Diff |
         =1  |   .6025066   .0267088    22.56   0.000     .5501476    .6548657
-------------+----------------------------------------------------------------
ft_dem       |
     Discrim |   2.649861   .1334331    19.86   0.000     2.388284    2.911439
        Diff |
       >= 1  |  -1.569466   .0463891   -33.83   0.000    -1.660406   -1.478527
       >= 2  |   -1.12261   .0369723   -30.36   0.000    -1.195089   -1.050131
       >= 3  |  -1.057702   .0359679   -29.41   0.000    -1.128212   -.9871915
       >= 4  |  -.7246827   .0316617   -22.89   0.000    -.7867512   -.6626142
       >= 5  |  -.3932924   .0285309   -13.78   0.000    -.4492234   -.3373614
       >= 6  |   .1296422   .0260293     4.98   0.000     .0786153    .1806691
       >= 7  |   .5573569   .0268452    20.76   0.000     .5047304    .6099834
       >= 8  |   1.027486   .0317919    32.32   0.000      .965162     1.08981
       >= 9  |   1.600889   .0440129    36.37   0.000     1.514607     1.68717
        =10  |   1.708747   .0471878    36.21   0.000     1.616242    1.801253
-------------+----------------------------------------------------------------
demvote      |
     Discrim |    2.11596   .1173565    18.03   0.000     1.885898    2.346022
        Diff |
         =1  |   .4812175   .0310255    15.51   0.000     .4203961    .5420388
------------------------------------------------------------------------------

. predict latentdem_rest, latent
(option ebmeans assumed)
(using 30 quadrature points)

. polychoric latentdem_rest pidtraditionaldem pidmythdem, pw verbose

Variables :  latentdem_rest pidtraditionaldem
Type :       polyserial
Rho        = .81500425
S.e.       = .00707918

Variables :  latentdem_rest pidmythdem
Type :       polyserial
Rho        = .86590484
S.e.       = .00625872
numerical derivatives are approximate
nearby values are missing
could not calculate numerical derivatives
missing values encountered
numerical derivatives are approximate
nearby values are missing
numerical derivatives are approximate
nearby values are missing

Variables :  pidtraditionaldem pidmythdem
Type :       polychoric
Rho        = .99886881
S.e.       = 6.159e-06
Goodness of fit tests:
Pearson G2 = ., Prob( >chi2(.)) = .
LR X2      = ., Prob( >chi2(.)) = .

. 
. irt grm pidrep ft_rep repvote [pweight=weight_full], intpoints(30) difficult intmethod(mvaghermite)

Fitting fixed-effects model:

Iteration 0:   log likelihood = -22808.327  
Iteration 1:   log likelihood = -22808.327  

Fitting full model:

Iteration 0:   log pseudolikelihood = -21572.368  
Iteration 1:   log pseudolikelihood =   -19934.5  
Iteration 2:   log pseudolikelihood = -19897.259  
Iteration 3:   log pseudolikelihood = -19855.033  
Iteration 4:   log pseudolikelihood = -19852.386  
Iteration 5:   log pseudolikelihood =  -19852.37  
Iteration 6:   log pseudolikelihood =  -19852.37  

Graded response model                           Number of obs     =      5,912
Log pseudolikelihood =  -19852.37
------------------------------------------------------------------------------
             |               Robust
             |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
pidrep       |
     Discrim |   5.496504   .5823476     9.44   0.000     4.355124    6.637885
        Diff |
        >=1  |   .3083672   .0234471    13.15   0.000     .2624117    .3543227
        >=2  |    .672632   .0256638    26.21   0.000      .622332     .722932
         =3  |   1.109793   .0313445    35.41   0.000     1.048358    1.171227
-------------+----------------------------------------------------------------
ft_rep       |
     Discrim |   2.728383   .1147946    23.77   0.000      2.50339    2.953377
        Diff |
       >= 1  |  -1.224489   .0367581   -33.31   0.000    -1.296534   -1.152445
       >= 2  |  -.8229336   .0309907   -26.55   0.000    -.8836743   -.7621929
       >= 3  |   -.771284   .0304568   -25.32   0.000    -.8309783   -.7115898
       >= 4  |  -.4571829   .0276146   -16.56   0.000    -.5113066   -.4030592
       >= 5  |  -.1465232   .0261268    -5.61   0.000    -.1977309   -.0953156
       >= 6  |    .402938   .0265654    15.17   0.000     .3508707    .4550053
       >= 7  |   .8802965   .0307182    28.66   0.000     .8200899     .940503
       >= 8  |   1.405968   .0398261    35.30   0.000      1.32791    1.484026
       >= 9  |   2.023906   .0571362    35.42   0.000     1.911921    2.135891
        =10  |   2.245158   .0652708    34.40   0.000      2.11723    2.373087
-------------+----------------------------------------------------------------
repvote      |
     Discrim |   2.437883   .1251727    19.48   0.000     2.192549    2.683217
        Diff |
         =1  |   .5963391   .0313808    19.00   0.000     .5348338    .6578444
------------------------------------------------------------------------------

. predict latentrep_2, latent ebmodes

. polychoric latentrep_2 closerep, pw verbose

Variables :  latentrep_2 closerep
Type :       polyserial
Rho        = .87085735
S.e.       = .00787537

. 
. irt grm piddem ft_dem demvote [pweight=weight_full], intpoints(30) difficult intmethod(mvaghermite)

Fitting fixed-effects model:

Iteration 0:   log likelihood = -23786.257  
Iteration 1:   log likelihood = -23786.257  

Fitting full model:

Iteration 0:   log pseudolikelihood = -22498.947  
Iteration 1:   log pseudolikelihood = -20760.206  
Iteration 2:   log pseudolikelihood = -20664.862  
Iteration 3:   log pseudolikelihood = -20623.332  
Iteration 4:   log pseudolikelihood = -20613.891  
Iteration 5:   log pseudolikelihood = -20611.724  
Iteration 6:   log pseudolikelihood = -20611.425  
Iteration 7:   log pseudolikelihood = -20611.414  
Iteration 8:   log pseudolikelihood = -20611.414  

Graded response model                           Number of obs     =      5,912
Log pseudolikelihood = -20611.414
------------------------------------------------------------------------------
             |               Robust
             |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
piddem       |
     Discrim |   8.433838   1.944022     4.34   0.000     4.623625    12.24405
        Diff |
        >=1  |   .1272457    .022501     5.66   0.000     .0831445    .1713468
        >=2  |   .4499628   .0229004    19.65   0.000      .405079    .4948467
         =3  |   .8941807    .025047    35.70   0.000     .8450894     .943272
-------------+----------------------------------------------------------------
ft_dem       |
     Discrim |   2.750024   .1132296    24.29   0.000     2.528099     2.97195
        Diff |
       >= 1  |  -1.549918   .0429836   -36.06   0.000    -1.634164   -1.465672
       >= 2  |   -1.11371    .034848   -31.96   0.000    -1.182011    -1.04541
       >= 3  |  -1.050189   .0340654   -30.83   0.000    -1.116956   -.9834222
       >= 4  |  -.7245618   .0304805   -23.77   0.000    -.7843024   -.6648212
       >= 5  |  -.4001075   .0278215   -14.38   0.000    -.4546367   -.3455783
       >= 6  |   .1168778   .0254287     4.60   0.000     .0670385    .1667171
       >= 7  |    .539709   .0259204    20.82   0.000     .4889059    .5905121
       >= 8  |    1.00612   .0296416    33.94   0.000     .9480241    1.064217
       >= 9  |   1.581984   .0403263    39.23   0.000     1.502946    1.661022
        =10  |   1.691355   .0431888    39.16   0.000     1.606706    1.776004
-------------+----------------------------------------------------------------
demvote      |
     Discrim |   2.035176   .1007014    20.21   0.000     1.837805    2.232547
        Diff |
         =1  |   .4888056   .0313655    15.58   0.000     .4273304    .5502809
------------------------------------------------------------------------------

. predict latentdem_2, latent ebmodes

. polychoric latentdem_2 closedem, pw verbose

Variables :  latentdem_2 closedem
Type :       polyserial
Rho        = .81058588
S.e.       = .00762506

. 
. *Item-test validation
. irt grm pidrep closerep ft_rep repvote [pweight=weight_full], intpoints(30) difficult intmethod(mvaghermite)

Fitting fixed-effects model:

Iteration 0:   log likelihood = -25782.226  
Iteration 1:   log likelihood = -25782.226  

Fitting full model:

Iteration 0:   log pseudolikelihood =  -23671.13  
Iteration 1:   log pseudolikelihood = -21359.845  
Iteration 2:   log pseudolikelihood = -21184.461  
Iteration 3:   log pseudolikelihood = -21156.205  
Iteration 4:   log pseudolikelihood = -21155.332  
Iteration 5:   log pseudolikelihood = -21155.327  
Iteration 6:   log pseudolikelihood = -21155.327  

Graded response model                           Number of obs     =      5,912
Log pseudolikelihood = -21155.327
------------------------------------------------------------------------------
             |               Robust
             |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
pidrep       |
     Discrim |   5.781967   .4002427    14.45   0.000     4.997506    6.566429
        Diff |
        >=1  |   .3121852   .0232167    13.45   0.000     .2666812    .3576891
        >=2  |   .6781219   .0248128    27.33   0.000     .6294897    .7267542
         =3  |   1.103726   .0291578    37.85   0.000     1.046578    1.160874
-------------+----------------------------------------------------------------
closerep     |
     Discrim |   5.226569   .3951904    13.23   0.000      4.45201    6.001128
        Diff |
         =1  |   .7692992   .0265833    28.94   0.000     .7171968    .8214016
-------------+----------------------------------------------------------------
ft_rep       |
     Discrim |   2.643192   .0942294    28.05   0.000     2.458506    2.827879
        Diff |
       >= 1  |  -1.237075    .036414   -33.97   0.000    -1.308445   -1.165705
       >= 2  |  -.8319826   .0309244   -26.90   0.000    -.8925934   -.7713718
       >= 3  |  -.7798281   .0303877   -25.66   0.000    -.8393868   -.7202693
       >= 4  |  -.4626523   .0277226   -16.69   0.000    -.5169875    -.408317
       >= 5  |  -.1492616   .0263553    -5.66   0.000     -.200917   -.0976062
       >= 6  |   .4050649   .0267596    15.14   0.000      .352617    .4575129
       >= 7  |   .8874126   .0306003    29.00   0.000     .8274371    .9473881
       >= 8  |   1.417398   .0396383    35.76   0.000     1.339708    1.495087
       >= 9  |   2.040466   .0564756    36.13   0.000     1.929776    2.151156
        =10  |   2.265004    .065273    34.70   0.000     2.137071    2.392937
-------------+----------------------------------------------------------------
repvote      |
     Discrim |   2.474551   .1183752    20.90   0.000     2.242539    2.706562
        Diff |
         =1  |   .5957721   .0307716    19.36   0.000     .5354608    .6560833
------------------------------------------------------------------------------

. predict latentrep_test, latent ebmodes

. polychoric latentrep_test pidtraditionalrep pidmythrep closerep, pw verbose

Variables :  latentrep_test pidtraditionalrep
Type :       polyserial
Rho        = .97213335
S.e.       = .00165452

Variables :  latentrep_test pidmythrep
Type :       polyserial
Rho        = .98941227
S.e.       = .00125153

Variables :  latentrep_test closerep
Type :       polyserial
Rho        = .95375784
S.e.       = .00285229
numerical derivatives are approximate
nearby values are missing
could not calculate numerical derivatives
missing values encountered
could not calculate numerical derivatives
missing values encountered

Variables :  pidtraditionalrep pidmythrep
Type :       polychoric
Rho        = .
S.e.       = .
Goodness of fit tests:
Pearson G2 = ., Prob( >chi2(.)) = .
LR X2      = ., Prob( >chi2(.)) = .

Variables :  pidtraditionalrep closerep
Type :       polychoric
Rho        = .90957273
S.e.       = .0071092
Goodness of fit tests:
Pearson G2 = ., Prob( >chi2(.)) = .
LR X2      = ., Prob( >chi2(.)) = .

Variables :  pidmythrep closerep
Type :       polychoric
Rho        = .93911565
S.e.       = .00554915
Goodness of fit tests:
Pearson G2 = ., Prob( >chi2(.)) = .
LR X2      = ., Prob( >chi2(.)) = .

. 
. irt grm piddem closedem ft_dem demvote [pweight=weight_full], intpoints(30) difficult intmethod(mvaghermite)

Fitting fixed-effects model:

Iteration 0:   log likelihood = -27082.868  
Iteration 1:   log likelihood = -27082.868  

Fitting full model:

Iteration 0:   log pseudolikelihood = -24915.168  
Iteration 1:   log pseudolikelihood = -22574.551  
Iteration 2:   log pseudolikelihood = -22421.975  
Iteration 3:   log pseudolikelihood =  -22387.07  
Iteration 4:   log pseudolikelihood = -22384.205  
Iteration 5:   log pseudolikelihood = -22384.118  
Iteration 6:   log pseudolikelihood = -22384.117  

Graded response model                           Number of obs     =      5,912
Log pseudolikelihood = -22384.117
------------------------------------------------------------------------------
             |               Robust
             |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
piddem       |
     Discrim |    6.36961   .5687342    11.20   0.000     5.254911    7.484309
        Diff |
        >=1  |   .1328175   .0226447     5.87   0.000     .0884346    .1772003
        >=2  |   .4672996   .0230613    20.26   0.000     .4221003    .5124988
         =3  |   .9149776   .0241761    37.85   0.000     .8675933     .962362
-------------+----------------------------------------------------------------
closedem     |
     Discrim |   3.580282   .1981099    18.07   0.000     3.191994    3.968571
        Diff |
         =1  |   .6238706   .0256102    24.36   0.000     .5736756    .6740656
-------------+----------------------------------------------------------------
ft_dem       |
     Discrim |   2.826642   .0986439    28.66   0.000     2.633304     3.01998
        Diff |
       >= 1  |  -1.540508    .041131   -37.45   0.000    -1.621123   -1.459893
       >= 2  |  -1.109427   .0335111   -33.11   0.000    -1.175108   -1.043747
       >= 3  |    -1.0467    .032838   -31.87   0.000    -1.111061   -.9823385
       >= 4  |  -.7245835   .0297144   -24.38   0.000    -.7828227   -.6663442
       >= 5  |  -.4017935   .0274498   -14.64   0.000    -.4555942   -.3479928
       >= 6  |   .1176135    .025307     4.65   0.000     .0680126    .1672144
       >= 7  |   .5451484   .0256121    21.28   0.000     .4949496    .5953473
       >= 8  |   1.008977   .0290201    34.77   0.000     .9520981    1.065855
       >= 9  |    1.56892   .0388669    40.37   0.000     1.492743    1.645098
        =10  |   1.673987   .0414285    40.41   0.000     1.592788    1.755185
-------------+----------------------------------------------------------------
demvote      |
     Discrim |   2.093883   .0967094    21.65   0.000     1.904336     2.28343
        Diff |
         =1  |   .4885508    .030369    16.09   0.000     .4290286    .5480729
------------------------------------------------------------------------------

. predict latentdem_test, latent ebmodes

. polychoric latentdem_test pidtraditionaldem pidmythdem closedem, pw verbose

Variables :  latentdem_test pidtraditionaldem
Type :       polyserial
Rho        = .97777401
S.e.       = .00123973

Variables :  latentdem_test pidmythdem
Type :       polyserial
Rho        = .99128983
S.e.       = .00094248

Variables :  latentdem_test closedem
Type :       polyserial
Rho        = .89650055
S.e.       = .004
could not calculate numerical derivatives
missing values encountered
could not calculate numerical derivatives
missing values encountered

Variables :  pidtraditionaldem pidmythdem
Type :       polychoric
Rho        = .
S.e.       = .
Goodness of fit tests:
Pearson G2 = ., Prob( >chi2(.)) = .
LR X2      = ., Prob( >chi2(.)) = .

Variables :  pidtraditionaldem closedem
Type :       polychoric
Rho        = .83494782
S.e.       = .00943576
Goodness of fit tests:
Pearson G2 = ., Prob( >chi2(.)) = .
LR X2      = ., Prob( >chi2(.)) = .

Variables :  pidmythdem closedem
Type :       polychoric
Rho        = .89915603
S.e.       = .00714615
Goodness of fit tests:
Pearson G2 = ., Prob( >chi2(.)) = .
LR X2      = ., Prob( >chi2(.)) = .

. 
. 
. log close
      name:  <unnamed>
       log:  C:\Users\Andy baker\OneDrive - University of Colorado at Boulder Office 365\My Documents\Research\Paper PID Experiment\USA\JOP IRT USA 2012 Resu
> lts.log
  log type:  text
 closed on:   7 Mar 2018, 15:07:48
-------------------------------------------------------------------------------------------------------------------------------------------------------------
